package wookee.basic;

public class J06_Ex51_BigGugudan {
	public static void main(String[] args) {
		
/*		int i = 7;
		int j = 1;
		while (j < 10){
			System.out.println(i +" X "+ j +" = "+ i*j++);
			
		}
*/
/*		int i = 18;
		int j = 1;
		while (j < 20){
			System.out.println(i +" X "+ j +" = "+ i*j++);
			
		}
*/	
		
		
		
		String sub = "\t    Multiplication Table";
		String bar = "-----------------------------------------";
					
		int i, j;
		
		System.out.println(sub);
		System.out.println("        1   2   3   4   5   6   7   8   9");
		System.out.println(bar);
		
		
		for ( i = 1 ; i<10 ; i++){
			System.out.print(i + " |    ");
			for( j = 1 ; j<9 ; j++){
				if(i*j < 10){
				System.out.print(" " + i*j + "  ");
				}else {
				System.out.print(i*j + "  ");
				}
			}
			if(i*j <10){
				System.out.println(" "+ i*j);
			}else{
			System.out.println(i*j);
			}
		}
		
	}

}
